package me.numark;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;

import me.numark.fragments.UsersListFragment;

/**
 * Created by Evan on 14/12/7.
 */
public class UsersListActivity extends FragmentActivity {

    public static final String EXTRA_USER_UID = "uid";
    public static final String EXTRA_USER_NICK = "nick";
    public static final String EXTRA_TYPE = "type";
    public static final int TYPE_FANS = UsersListFragment.TYPE_FANS;
    public static final int TYPE_FOLLOWERS = UsersListFragment.TYPE_FOLLOWERS;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fragment);
        String uid = getIntent().getStringExtra(EXTRA_USER_UID);
        String nick = getIntent().getStringExtra(EXTRA_USER_NICK);
        int type = getIntent().getIntExtra(EXTRA_TYPE, 0);
        Fragment fragment = UsersListFragment.newInstance(uid, nick, type);
        getSupportFragmentManager().beginTransaction().add(R.id.fragment, fragment).commit();
    }
}
